package com.weishu.housing.controller;

import com.weishu.common.core.web.controller.BaseController;
import com.weishu.common.core.web.page.TableDataInfo;
import com.weishu.common.security.annotation.PreAuthorize;
import com.weishu.core.entity.TbRoomReservation;
import com.weishu.core.service.ITbRoomReservationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/room")
public class RoomReservationController extends BaseController {
    @Autowired
    ITbRoomReservationService iTbRoomReservationService;
    @PreAuthorize(hasPermi = "hourse:tenant:list")
    @GetMapping("/list")
    public TableDataInfo list(TbRoomReservation tbRoomReservation)
    {
        startPage();
        List<TbRoomReservation> list = iTbRoomReservationService.selectRoomList(tbRoomReservation);
        return getDataTable(list);
    }

}
